package com.boot.vo;

import com.boot.enums.ResultEnum;
import lombok.Data;

@Data
public class LayuiModel {
    public LayuiModel(ResultEnum resultEnum) {
        this.code=Long.valueOf(resultEnum.getCode());
        this.msg = resultEnum.getMessage();
    }
    public LayuiModel() {
        this.code=0L;
        this.count = 0L;
    }

    public LayuiModel(Long count, Object data) {
        this.code=0L;
        this.count = count;
        this.data = data;
    }

    private Long code;
    private Long count;
    private String msg;
    private Object data;

    public LayuiModel setCode(Long code) {
        this.code = code;
        return this;
    }

    public LayuiModel setCount(Long count) {
        this.count = count;
        return this;
    }

    public LayuiModel setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public LayuiModel setData(Object data) {
        this.data = data;
        return this;
    }
}
